from demo_python_pkg.person_node import PersonNode
import rclpy
class WriterNode(PersonNode):
    def __init__(self,node,name, age,books):
        super().__init__(node,name, age)
        self.books = books

    def write_book(self):
            print(f'{self.name}正在写{self.books}')


def main():
    rclpy.init()
    writer = WriterNode('zhangsan','大赛', 99, 'python')
    writer.write_book()
    writer.eat('锤子')
    rclpy.spin(writer)
    rclpy.shutdown()